← Back
Editing: index498.js
import{c as e,s as a,h as s,r as l,o as t,k as o,l as r,e as n,x as i,p as c,y as m,q as u,aj as p,a7 as d,a4 as f}from"./base-lib.js?v=VERSION_NUMBER";import{_ as y}from"./validator.js?v=VERSION_NUMBER";import{u as j,J as v,l as _,b as h,e as b}from"./utils-lib.js?v=VERSION_NUMBER";import{aV as x,aW as w}from"./firewall.js?v=VERSION_NUMBER";import{H as V}from"./index320.js?v=VERSION_NUMBER";import{H as g}from"./store7.js?v=VERSION_NUMBER";import"./__commonjsHelpers__.js?v=VERSION_NUMBER";import"./index106.js?v=VERSION_NUMBER";import"./column.js?v=VERSION_NUMBER";import"./index49.js?v=VERSION_NUMBER";import"./index111.js?v=VERSION_NUMBER";import"./store3.js?v=VERSION_NUMBER";import"./store4.js?v=VERSION_NUMBER";import"./hooks.js?v=VERSION_NUMBER";const k={class:"p-[2rem]"},C={class:"tip"},H=b(e({__name:"index",emits:["close"],setup(e,{expose:b,emit:H}){const S=V(),T=g(),{repairTypeActive:U}=a(S),{isMalwareConfirm:q}=a(T),A=H,{payment:D}=j(),{authType:F}=D.value,I=h(),J=s({cycle:"0",channel:[],status:!1}),M=l(),N=l(!1),O=async(e=!1)=>{const{data:a}=await x();J.cycle=a.cycle,J.channel=""===a.channel?[]:a.channel.split(","),J.status=!!a.status,e&&I.success("刷新成功")};return b({onConfirm:async()=>{if("ltd"!==F)return I.error("抱歉!该功能为企业版专享功能!");J.channel=J.channel.filter((e=>e));let e=J.channel.join(",");e||!J.status?(await M.value.validate(),v({loading:N,request:w({day:Number(J.cycle),channel:e,status:J.status?1:0}),message:!0,success:e=>{e.status&&(O(),"overview"===U.value&&(q.value=!0,T.capabilitySwitch.vul_scan.status=J.status,T.getSafeOverviewData()),A("close"))}})):I.error("请选择告警方式")}}),t((()=>{O()})),(e,a)=>{const s=p,l=d,t=_,j=y,v=f;return o(),r("div",k,[n(v,{model:c(J),ref_key:"safeScanForm",ref:M,disabled:c(N)},{default:i((()=>[n(l,{label:"自动扫描"},{default:i((()=>[n(s,{modelValue:c(J).status,"onUpdate:modelValue":a[0]||(a[0]=e=>c(J).status=e)},null,8,["modelValue"])])),_:1}),n(l,{label:"周期",prop:"cycle"},{default:i((()=>[n(t,{class:"!w-[14rem]",modelValue:c(J).cycle,"onUpdate:modelValue":a[1]||(a[1]=e=>c(J).cycle=e),min:0,type:"number",textType:"天"},{append:i((()=>a[4]||(a[4]=[m(" 天 ")]))),_:1},8,["modelValue"])])),_:1}),n(l,{label:"告警方式",prop:"give"},{default:i((()=>[n(j,{class:"!w-[36rem]",modelValue:c(J).channel,"onUpdate:modelValue":a[2]||(a[2]=e=>c(J).channel=e),limit:["sms","wx_account"]},null,8,["modelValue"])])),_:1})])),_:1},8,["model","disabled"]),u("div",C,[u("ul",null,[u("li",null,[a[5]||(a[5]=m(" 点击配置后状态未更新,尝试点击【 ")),u("span",{class:"text-[#20a53a] hover:text-[#1d9534] cursor-pointer",onClick:a[3]||(a[3]=e=>O(!0))},"手动刷新"),a[6]||(a[6]=m(" 】 "))])])])])}}}),[["__scopeId","data-v-be713e21"]]);export{H as default};
Save File
Cancel